package com.readpost.service;

import com.readpost.doman.Entity.ArticleCategories;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface ArticleCategoriesService {

     //增加文章分类
     void addCategory(ArticleCategories category);

     //通过名称判断分类是否存在
     boolean isCategoryNameExists(ArticleCategories categoryName);

     //通过Id判断分类是否存在
     boolean isCategoryIdExists(Integer categoryId);

     //获取所有文章分类
     List<ArticleCategories> getAllCategory();


     //根据分类Id查询分类
     ArticleCategories getCategoryById(Integer categoryId);

     //删除文章分类
     void deleteCategory(Integer categoryId);

     //文章分类详情
     ArticleCategories getDetailCategory(Integer categoryId);

     //修改文章分类
     void updateCategory(ArticleCategories category);
}
